package com.tang.model.memorandum;

import java.util.Arrays;

/**
 * @Author tangyuan2meicloud.com
 * @DATE 2021/9/5 13:49
 * @Desc
 * @Remarks
 */
public class Test {
    public static void main(String[] args) {

        DraftBox draftBox = new DraftBox();
        Editor editor = new Editor();
        editor.setTitle("AAAAA");
        editor.setContent("BBBB");
        editor.setPhotos(Arrays.asList("CCCCC"));

        draftBox.addMemorandum(editor.saveToMemorandum());
        editor.setTitle("DDDDDD");
        draftBox.addMemorandum(editor.saveToMemorandum());
        editor.setTitle("EEEEEE");
        draftBox.addMemorandum(editor.saveToMemorandum());
        editor.setTitle("FFFFF");

        System.out.println(editor);

        System.out.println("=========恢复1=============");

        editor.undo(draftBox.withdraw());
        System.out.println(editor);

        System.out.println("=========恢复2=============");

        editor.undo(draftBox.withdraw());
        System.out.println(editor);
    }
}
